<template>
    <div class="fixed top-0 left-0 w-screen h-screen flex justify-center items-center flex-col">
        <CoreBackGroundColorComponent />
        <CoreBarNavightionComponent />
        <div class="fixed w-full justify-center items-center text-center bg-red-300">
            <div v-if="indexHomeStore.coreTabbarItemsComponentStore.active == 0"
                class="fixed w-full top-10 h-auto justify-center items-center text-center">
                <HomeIndexComponents />
            </div>
            <div v-else-if="indexHomeStore.coreTabbarItemsComponentStore.active == 1"
                class="fixed w-full top-10 h-auto justify-center items-center text-center">
                <UserInfoCardComponent />
                <HomeSettingPageComponent />
                <div class="mt-4 ml-2 mr-3">
                    <div class="p-2">
                        <van-button type="danger" @click="indexHomeStore.asyLoginOuted" block round>退出登录</van-button>
                    </div>
                </div>
            </div>
        </div>
        <CoreTabbarItemsComponent />
    </div>
</template>

<script setup lang="ts">
const indexHomeStore = useHomeIndexStore();

onBeforeMount(() => {
    indexHomeStore.initStore();
})
</script>

<style scoped></style>